package com.yisu.auction.manager.core.service.impl;

import com.yisu.auction.ewf.common.web.EasyUIGrid;
import com.yisu.auction.ewf.entity.Recharge;
import com.yisu.auction.manager.core.mapper.RechargeMapper;
import com.yisu.auction.manager.core.service.IRechargeService;
import com.yisu.auction.manager.domain.request.memberPackage.RechargeRequest;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * author: 赵杰
 * Business Description：
 * createTime：2017/10/23
 */
@Service("IRechargeService")
public class RechargeServiceImpl extends BaseService implements IRechargeService{
    @Resource
    private RechargeMapper rechargeMapper;
    /**
     * author:赵杰
     * Business Description : 分页获取会员信息
     *
     * @param rechargeRequest 分页请求信息
     * @return 商品分类列表
     */
    @Override
    public EasyUIGrid<Recharge> getRechargeListByPage(RechargeRequest rechargeRequest) {
        List<Recharge> members = rechargeMapper.getRechargeListByPage(rechargeRequest);
        EasyUIGrid<Recharge> gridData = new EasyUIGrid<>();
        gridData.setTotal(rechargeRequest.getTotalRecords());
        gridData.setRows(members);
        return gridData;
    }
}
